using System;
using Castle.ActiveRecord;
using CosyTrade.Data;

namespace CosyTrade.Distribution
{
    [AddPropertyChangedNotifyInterface, PropertyChangedNotify]
    [ActiveRecord("tabRegion"), Serializable]
    public class Region : RegionBase
    {
        private RegionBase parentRegionbase;

        [JoinedKey("ROWGUID")]
        public Guid RelationKey
        {
            get { return PrimaryKey; }
        }

        [BelongsTo("ParentGuid")]
        public RegionBase ParentRegionbase
        {
            get { return parentRegionbase; }
            set { parentRegionbase = value; }
        }
    }
}